﻿using System;

namespace Bootstrap5.Abstractions;

/// <summary>
/// Represents an data-bs-* attribute for Bootstrap for parameter in component.
/// </summary>
[AttributeUsage(AttributeTargets.Property,AllowMultiple =false)]
public class DataTriggerAttribute:Attribute
{
    /// <summary>
    /// Initializes an instance of <see cref="DataTriggerAttribute"/> class by given name.
    /// </summary>
    /// <param name="name">Name of 'data-bs-{value}' value.</param>
    public DataTriggerAttribute(string name)
    {
        Name = name;
    }
    /// <summary>
    /// The name of trigger.
    /// </summary>
    public string Name { get; }
    /// <summary>
    /// The value to apply if parameter is null value.
    /// </summary>
    public string NullValue { get; set; }
}
